<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 病案首页数据质量分析 -->
</head>
<body>
	<!-- 开始截止日期以及查询按钮  begin -->
	<div class="col-xs-12" style="height:56px;" >
		<div id="date_div" class="col-xs-offset-3  date_div" >
			<img id="search_png" src="images/co_search.png" >
		  	<label for="startDate" >&nbsp;&nbsp;开始日期:</label>
		  	<input id="startDate" type="text" class="form-control" >
		  	<label for="endDate" >&nbsp;&nbsp;截止日期:</label>
		  	<input id="endDate" type="text" class="form-control" >
		</div>
	</div>
	<!-- 开始截止日期以及查询按钮 end -->
	<!-- 问题病例汇总 begin -->
	<div class="row rowhcq">
	    <div class="col-xs-12">
	        <!-- 页面最上面部分div --> 
	        <div class="boxcq clearfix">
	            <div class="ti"><i class="fa fa-file-text-o"></i>问题病例汇总</div>
	            <ul class="nav nav-tabs boxnavcq" role="tablist"></ul>
	            <div class="clearfix"></div>
				<div class="col-xs-12">
		            <table id="abnormalCaseTable"></table>
				</div>
	        </div>
	    </div>
	</div>
	<!-- 问题病例汇总 end -->
	    
	<script type="text/javascript">
		//日期选择器
		$("#"+tabId+" #startDate").datetimepicker({
			format : "yyyy-mm-dd",
			autoclose : true,
			todayBtn : true,
			minView : 2,
			language : 'zh-CN'
		});
		$("#"+tabId+" #endDate").datetimepicker({
			format : "yyyy-mm-dd",
			autoclose : true,
			todayBtn : true,
			minView : 2,
			language : 'zh-CN',
		});
		$("#"+tabId+" #startDate")
		.datetimepicker()
		.on('show', function(ev){
			$('#'+tabId+' #date_div').unbind();
		});
		$("#"+tabId+" #startDate")
		.datetimepicker()
		.on('hide', function(ev){
			$('#'+tabId+' #date_div').bind('mouseover', opc1);
			$('#'+tabId+' #date_div').bind('mouseout', opc0);
		});
		$("#"+tabId+" #endDate")
		.datetimepicker()
		.on('show', function(ev){
			$('#'+tabId+' #date_div').unbind();
		});
		$("#"+tabId+" #endDate").datetimepicker().on('hide', function(ev){
			$('#'+tabId+' #date_div').bind('mouseover', opc1);
			$('#'+tabId+' #date_div').bind('mouseout', opc0);
		});
		
	</script>
	<script>
	$(function(){
			var now = GetDateStr(0,'d');
			var year = now.split("-")[0];
			var month = now.split("-")[1];
			$('#'+tabId+' input#startDate').val(year+"-"+month+"-01");//开始时间
			$('#'+tabId+' input#endDate').val(now);//结束时间
			
			//加载异常病例数据
			$('#'+tabId+' #search_png').click(function(){
				//ajax 请求 和 结束的效果加载
				
				$(document).ajaxStop(function(){
					
				});
		    	$.post(contextPath+"/fileUpload/getAbnormalCase.dhc",{
					'start':$('#'+tabId+' input#startDate').val(),
					'end':$('#'+tabId+' input#endDate').val()
				}).done(function(res){
					var paramsDataTables={lengthChange:false,ordering:false};
					var columns=[ 
									{ "title": "主键"},
						            { "title": "异常原因"},
						            { "title": "导入日期"}
				                 ];
					var table = $('#'+tabId+' #abnormalCaseTable').dataTableBasic(columns,res.data,paramsDataTables);
				});
			});
			$('#'+tabId+' #search_png').click();
		})
	</script>
	
</body>
</html>